package priv.mill.entry;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
@Component
public class UserServer_ {
	public static Logger logger = Logger.getLogger(UserServer_.class);
	
	@Autowired
	JdbcTemplate jdbcTemplate;
	
	public void saveThis(){
		String sql = "update user_t set user_name=? where id=?";
		int update = jdbcTemplate.update(sql,"aa",5);
		logger.debug(update);
		updateThis();
	}
	public void updateThis(){
		String sql = "update user_t set user_name=? where id=?";
		int update = jdbcTemplate.update(sql, "aaacccsss",5);
		logger.debug(update);
		throw new RuntimeException("k库存不足");
	}
}
